Skip to content

Conversation

@aoengin
Copy link
Contributor

@aoengin aoengin commented Nov 4, 2025

No description provided.

@aoengin aoengin requested review from atacann and Copilot November 4, 2025 08:44
@aoengin aoengin linked an issue Nov 4, 2025 that may be closed by this pull request
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the wallet creation flow by returning and displaying the wallet file path to users. The change improves user experience by providing immediate feedback about where their wallet data is stored.

  • Modified store_wallet_data to return the wallet file path
  • Updated create_encrypted_wallet to propagate the file path through its return value
  • Added user-facing output in cli_create_wallet to display the wallet file location

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/wallet/wallet_storage.rs Changed store_wallet_data return type from Result<(), BridgeCliError> to Result<PathBuf, BridgeCliError> to return wallet file path
src/wallet/mod.rs Updated create_encrypted_wallet signature to include PathBuf in return tuple and capture the returned wallet file path
src/cli.rs Destructured new return value from create_encrypted_wallet and added user output to display wallet file path
Comments suppressed due to low confidence (3)

src/wallet/mod.rs:184

  • The store_wallet_data function now returns a PathBuf, but this return value is being discarded. Consider capturing and displaying the wallet file path to maintain consistency with the wallet creation flow, similar to how it's displayed in cli_create_wallet.
    wallet_storage::store_wallet_data(
        &address,
        network,
        &encrypted_mnemonic,
        &encrypted_private_key,
        true,
        Some("mnemonic_import"),
        label,
    )
    .map_err(|e| {
        tracing::error!("Error storing wallet data: {}", e);
        BridgeCliError::WalletStorageFailed
    })?;

src/wallet/mod.rs:270

  • The store_wallet_data function now returns a PathBuf, but this return value is being discarded. Consider capturing and displaying the wallet file path to maintain consistency with the wallet creation flow, similar to how it's displayed in cli_create_wallet.
    wallet_storage::store_wallet_data(
        &wallet_address,
        network,
        &encrypted_mnemonic_data,
        &encrypted_private_key_data,
        true,
        Some("file_import"),
        label,
    )?;

src/wallet/mod.rs:339

  • The store_wallet_data function now returns a PathBuf, but this return value is being discarded. Consider capturing and displaying the wallet file path to maintain consistency with the wallet creation flow, similar to how it's displayed in cli_create_wallet.
    wallet_storage::store_wallet_data(
        &address,
        network,
        &encrypted_mnemonic,
        &encrypted_private_key,
        true,
        Some("private_key_import"),
        label,
    )
    .map_err(|e| BridgeCliError::Eyre(eyre::eyre!("Failed to store wallet: {}", e)))?;

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wallet creation show file path

2 participants